package org.zjx.strategy;

import org.zjx.command.ICommand;
import org.zjx.core.IWindow;

import java.awt.image.BufferedImage;

import org.zjx.state.StateManager;


/**
 * 游戏策略接口
 */
public interface IStrategy {
    /**
     * 分析截图并生成指令
     */
    ICommand analyze(IWindow window, BufferedImage screenshot, StateManager stateManager);

    /**
     * 获取策略名称
     */
    String getStrategyName();

    /**
     * 获取策略优先级（数值越小优先级越高）
     */
    default int getPriority() {
        return 10;
    }

    /**
     * 检查是否适用当前情况
     */
    boolean isApplicable(IWindow window, BufferedImage screenshot, StateManager stateManager);
}